#ifndef __RKMEDIA_MODULE_CONTAINER__
#define __RKMEDIA_MODULE_CONTAINER__

#define CONTAINER_SIZE 16

extern "C"
{
#include <pthread.h>
#include <string.h>
}

typedef struct
{
    unsigned int index;
    unsigned int vi_chn;
} RV1126_VI_CONTAINER;

typedef struct
{
    unsigned int index;
    unsigned int venc_chn;
} RV1126_VENC_CONTAINER;

typedef struct
{
    unsigned int index;
    unsigned int rga_chn;
} RV1126_RGA_CONTAINER;

typedef struct
{
    RV1126_VI_CONTAINER vi_container[CONTAINER_SIZE];
    RV1126_VENC_CONTAINER venc_container[CONTAINER_SIZE];
    RV1126_RGA_CONTAINER rga_container[CONTAINER_SIZE];
} RV1126_ALLUSED_CONTAINER;

class containerInfo
{
public:
    containerInfo();
    ~containerInfo();
    pthread_mutex_t container_mutex;
    RV1126_ALLUSED_CONTAINER above_container;
    int set_vi_container(unsigned int index, RV1126_VI_CONTAINER *vi_container);
    int set_venc_container(unsigned int index, RV1126_VENC_CONTAINER *venc_container);
    int set_rga_container(unsigned int index, RV1126_RGA_CONTAINER *rga_container);
    int get_vi_container(unsigned int index, RV1126_VI_CONTAINER *vi_container);
    int get_venc_container(unsigned int index, RV1126_VENC_CONTAINER *venc_container);
    int get_rga_container(unsigned int index, RV1126_RGA_CONTAINER *rga_container);
};

#endif